---
title: Charmhub | Deploy Parca Agent using Charmhub - The Open Operator Collection
description: Deploy the latest version of Parca Agent on any cloud.
url: https://charmhub.io/parca-agent/docs/Autoinstrument machine charms with parca-agent
---

# Parca Agent

[Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

* [Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

Platform:

26.04

24.04

22.04

0.35/stable d643c54

```
juju deploy parca-agent --channel 0.35/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Relevant links

* [Homepage](https://charmhub.io/parca-agent)

---

#### Contacts

* [Submit a bug](https://github.com/canonical/parca-agent-operator/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

[Parca-agent-operator](https://github.com/canonical/parca-agent-operator) deploys a whole-system profiler, `parca-agent`. When deployed on a machine model as a subordinate to a principal charm, `parca-agent` will:

* Collect stack traces from all processes running on the machine including that of the principal charm as well as any other process running on the machine (e.g: `systemd` and `snapd`).
* Push all collected profiles to a [parca server](https://charmhub.io/parca-k8s)

# 1. Configure a machine

In a machine controller:

```
juju add-model profiling
juju add-machine --constraints="virt-type=virtual-machine" --base ubuntu@24.04
```

The machine `virt-type` needs to be `virtual-machine` for the `parca-agent` snap to work.

See more: [Charm active even if the snap fails to start · Issue #37 · canonical/parca-agent-operator · GitHub](https://github.com/canonical/parca-agent-operator/issues/37)

The machine’s ubuntu base image needs to be `ubuntu@24.04` for the `parca-agent` snap to work.
This, because only kernels support eBPF probes.
See more: [parca-agent doesn't work on lxc VMs with ubuntu 22.04 base · Issue #47 · canonical/parca-agent-operator · GitHub](https://github.com/canonical/parca-agent-operator/issues/47)

# 2. Deploy a principal test charm

We’ll be deploying [ubuntu charm](https://charmhub.io/ubuntu) as a test machine charm, but any arbitrary principal charm could be deployed **given that it can run on `ubuntu@24.04`**.

```
juju deploy ubuntu --channel edge --base ubuntu@24.04 --to <machine_id>
```

# 3. Deploy `parca-agent`

```
juju deploy parca-agent --channel edge
juju integrate parca-agent ubuntu
```

# 4. Deploy `parca-k8s`

Then, deploy a `parca-k8s` server, which will later be configured to receive collected profiling data from the `parca-agent`.

In a Kubernetes controller:

```
juju add-model cos
juju deploy parca-k8s parca --channel edge
```

# 5. Integrate `parca-agent` and `parca-k8s`

In `cos` model:

```
juju offer parca:parca-store-endpoint
```

In `profiling` machine model:

```
juju consume <k8s_controller>:cos.parca
juju integrate parca parca-agent
```

`grafana-agent` does not support proxying profiles. For now, we’ll use cross-model relations to integrate `parca-agent` and `parca-k8s` directly until we have a charmed OTel collector available.

# 6. View profiling data

Switch to the Kubernetes model and get the IP address of your `parca-k8s` service.

```
PARCA_IP=$(juju status | grep 'parca/0\*' | awk '{print $4}')
```

Then, in your local browser, open Parca UI on `$PARCA_IP:7070`

You should see an output similar to the one below, where you can find profiles for all processes running on the machine:

---
